package com.xdf.whiteaccount.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
/**
 * 版本号：20240401
 * 由 chanchaw 创建于 2025-5-15 9:19:37，实现功能如下：
 * 1. 实现接口 Serializable
 * 2. 无参构造函数
 * 3. 建造者模式
 * 4. getter,setter,toString()
 * 地址表
 */
public class Address implements Serializable {
    public Address() {}
    private static final long serialVersionUID = 1L;

    private Integer id;//
    private String parentId;//关联contact_company的id
    private String location;//地址
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private java.util.Date createTime;//创建时间
    private String remarks;//备注
    private String standby01;//备用01
    private String standby02;//备用02

    public Integer getId(){return this.id;}
    public void setId(Integer id){this.id = id;}
    public String getParentId(){return this.parentId;}
    public void setParentId(String parentId){this.parentId = parentId;}
    public String getLocation(){return this.location;}
    public void setLocation(String location){this.location = location;}
    public java.util.Date getCreateTime(){return this.createTime;}
    public void setCreateTime(java.util.Date createTime){this.createTime = createTime;}
    public String getRemarks(){return this.remarks;}
    public void setRemarks(String remarks){this.remarks = remarks;}
    public String getStandby01(){return this.standby01;}
    public void setStandby01(String standby01){this.standby01 = standby01;}
    public String getStandby02(){return this.standby02;}
    public void setStandby02(String standby02){this.standby02 = standby02;}


    @Override
    public String toString() {
        return "Address{" +
        ",id='" + id + '\'' +
        ",parentId='" + parentId + '\'' +
        ",location='" + location + '\'' +
        ",createTime='" + createTime + '\'' +
        ",remarks='" + remarks + '\'' +
        ",standby01='" + standby01 + '\'' +
        ",standby02='" + standby02 + '\'' +
        '}';
    }

    public static class Builder{
        private Integer id;
        private String parentId;
        private String location;
        private java.util.Date createTime;
        private String remarks;
        private String standby01;
        private String standby02;

        public Builder id(Integer id){this.id = id;return this;}
        public Builder parentId(String parentId){this.parentId = parentId;return this;}
        public Builder location(String location){this.location = location;return this;}
        public Builder createTime(java.util.Date createTime){this.createTime = createTime;return this;}
        public Builder remarks(String remarks){this.remarks = remarks;return this;}
        public Builder standby01(String standby01){this.standby01 = standby01;return this;}
        public Builder standby02(String standby02){this.standby02 = standby02;return this;}
        public Address build(){
            return new Address(this);
        }
    }

    public static Builder builder(){return new Builder();}
    public Address(Builder builder){
        this.id = builder.id;
        this.parentId = builder.parentId;
        this.location = builder.location;
        this.createTime = builder.createTime;
        this.remarks = builder.remarks;
        this.standby01 = builder.standby01;
        this.standby02 = builder.standby02;
    }
    /**
     * 自定义代码请写在此处之后
     */
}
